define(['cm',"jquery"],function(){
    $('footer').load('../html/footer.html')
    class Welcome{
        constructor(){
            this.user1=document.querySelector('.user1')
            this.p1=document.querySelector('h1')
            this.backButton=document.querySelector('#backTo')
            this.headImg=document.querySelector('.headImg')
            this.show()
            this.back()
            this.show()
        }
        show(){
            var c=getCookie('用户')
            console.log(c)
            if(c){
                this.p1.innerHTML='Hello, 尊敬的用户：'+c+'您好！'
            }
        }
        back(){
            this.backButton.addEventListener('click',()=>{
                console.log(11)
                self.location='shop.html'
            })
        }
        show(){
            var str=`<img src=${getCookie('头像')}>`
            this.headImg.innerHTML=str
        }
    }
    new Welcome()
})